.TH "Zebulon::Underwater::GlobalCommand" 3 "13 Oct 2009" "Version 2" "zebulon" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Zebulon::Underwater::GlobalCommand \- 
.SH SYNOPSIS
.br
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBGlobalCommand\fP ()"
.br
.RI "\fIConstructor, initializes default values. \fP"
.ti -1c
.RI "\fB~GlobalCommand\fP ()"
.br
.RI "\fIDestructor. \fP"
.ti -1c
.RI "int \fBInitialize\fP (\fBGlobalInfo\fP *globalInfo, unsigned int delayTimeMs=50)"
.br
.RI "\fIInitialize, must be called to initialize class and passed global info. \fP"
.ti -1c
.RI "int \fBSetDesiredHeading\fP (const double heading)"
.br
.RI "\fISets the desired heading. \fP"
.ti -1c
.RI "int \fBSetDesiredDepth\fP (const double depth)"
.br
.RI "\fISets the desired depth. \fP"
.ti -1c
.RI "int \fBSetForwardPower\fP (const double power)"
.br
.RI "\fISets the desired forward thruster power. \fP"
.ti -1c
.RI "int \fBSetVerticalPower\fP (const double power)"
.br
.RI "\fISets the desired vertical thruster power. \fP"
.ti -1c
.RI "int \fBSetTurnPower\fP (const double power)"
.br
.RI "\fISets the desired turn thruster power. \fP"
.ti -1c
.RI "int \fBSetDigitalDeviceState\fP (const DigitalDevice port, const bool state)"
.br
.RI "\fISets the desired state of the device. \fP"
.ti -1c
.RI "double \fBGetDesiredHeading\fP ()"
.br
.ti -1c
.RI "double \fBGetForwardPower\fP ()"
.br
.ti -1c
.RI "double \fBGetVerticalPower\fP ()"
.br
.ti -1c
.RI "double \fBGetTurnPower\fP ()"
.br
.ti -1c
.RI "void \fBPrintStatus\fP () const "
.br
.RI "\fIPrints status of important variables. \fP"
.ti -1c
.RI "int \fBShutdown\fP ()"
.br
.ti -1c
.RI "bool \fBLoadXML\fP (std::string filename)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual int \fBProcessDiscoveryEvent\fP (const Jaus::Platform &subsystem, const Jaus::SubscriberComponent::DiscoveryEvents eventType)"
.br
.ti -1c
.RI "bool \fBLoadControllerXML\fP (\fBTiXmlElement\fP *xml, CxUtils::PIDController &controller)"
.br
.in -1c
.SS "Static Protected Member Functions"

.in +1c
.ti -1c
.RI "static void \fBCommandThread\fP (void *args)"
.br
.RI "\fIthread where we send out commands \fP"
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBGlobalInfo\fP * \fBmGlobalInfo\fP"
.br
.ti -1c
.RI "Jaus::Address \fBmPrimitiveDriverID\fP"
.br
.RI "\fIDrives the sub. \fP"
.ti -1c
.RI "Jaus::Address \fBmRabbitID\fP"
.br
.RI "\fIAddress of rabbit component which controls many devices. \fP"
.ti -1c
.RI "int \fBmDelayTimeMs\fP"
.br
.RI "\fIfrequency that we send commands out. \fP"
.ti -1c
.RI "CxUtils::Thread \fBmCommandThread\fP"
.br
.ti -1c
.RI "double \fBmDesiredHeading\fP"
.br
.ti -1c
.RI "double \fBmDesiredDepth\fP"
.br
.ti -1c
.RI "double \fBmForwardPower\fP"
.br
.ti -1c
.RI "double \fBmVerticalPower\fP"
.br
.ti -1c
.RI "double \fBmTurnPower\fP"
.br
.ti -1c
.RI "int \fBmForwardMode\fP"
.br
.RI "\fItells us the last type of command issued defined by enum CommandMode \fP"
.ti -1c
.RI "int \fBmVerticalMode\fP"
.br
.ti -1c
.RI "int \fBmTurnMode\fP"
.br
.ti -1c
.RI "CxUtils::Mutex \fBmHeadingMutex\fP"
.br
.ti -1c
.RI "int \fBmSolenoid2FireCount\fP"
.br
.ti -1c
.RI "int \fBmSolenoid2State\fP"
.br
.ti -1c
.RI "Jaus::Device \fBmSolenoid1\fP"
.br
.ti -1c
.RI "Jaus::Device \fBmSolenoid2\fP"
.br
.ti -1c
.RI "Jaus::Device \fBmError1\fP"
.br
.ti -1c
.RI "Jaus::Device \fBmError2\fP"
.br
.ti -1c
.RI "Jaus::Device \fBmHydroOut1\fP"
.br
.ti -1c
.RI "Jaus::Device \fBmHydroOut2\fP"
.br
.ti -1c
.RI "Jaus::Device \fBmSpareOut1\fP"
.br
.ti -1c
.RI "volatile bool \fBmSolenoid1Changed\fP"
.br
.ti -1c
.RI "volatile bool \fBmSolenoid2Changed\fP"
.br
.ti -1c
.RI "volatile bool \fBmError1Changed\fP"
.br
.ti -1c
.RI "volatile bool \fBmError2Changed\fP"
.br
.ti -1c
.RI "volatile bool \fBmHydroOutChanged1\fP"
.br
.ti -1c
.RI "volatile bool \fBmHydroOutChanged2\fP"
.br
.ti -1c
.RI "volatile bool \fBmSpareOut1Changed\fP"
.br
.ti -1c
.RI "CxUtils::Mutex \fBmDeviceMutex\fP"
.br
.ti -1c
.RI "CxUtils::PIDController \fBmHeadingController\fP"
.br
.ti -1c
.RI "CxUtils::PIDController \fBmDepthController\fP"
.br
.ti -1c
.RI "double \fBmPropulsiveLinearEffortX\fP"
.br
.ti -1c
.RI "double \fBmPropulsiveRotationalEffortZ\fP"
.br
.ti -1c
.RI "double \fBmPropulsiveLinearEffortZ\fP"
.br
.in -1c
.SH "Member Function Documentation"
.PP 
.SS "void GlobalCommand::CommandThread (void * args)\fC [static, protected]\fP"
.PP
thread where we send out commands Thread responsible for sending out Jaus commands.
.PP
\fBParameters:\fP
.RS 4
\fIargs\fP This global command class. 
.RE
.PP

.SS "int GlobalCommand::Initialize (\fBGlobalInfo\fP * globalInfo, unsigned int delayTimeMs = \fC50\fP)"
.PP
Initialize, must be called to initialize class and passed global info. \fBParameters:\fP
.RS 4
\fIglobalInfo\fP global info class that we will be getting feedback from 
.br
\fIdelayTimeMs\fP frequency between sending all commands. 
.RE
.PP

.SS "int GlobalCommand::SetDesiredDepth (const double depth)"
.PP
Sets the desired depth. \fBParameters:\fP
.RS 4
\fIdepth\fP depth in meters, 0 is surface, max bound undefined. 
.RE
.PP

.SS "int GlobalCommand::SetDesiredHeading (const double heading)"
.PP
Sets the desired heading. \fBParameters:\fP
.RS 4
\fIheading\fP in degrees from 0 to 360 where 0 = north, 90 = east. 
.RE
.PP

.SS "int GlobalCommand::SetDigitalDeviceState (const DigitalDevice port, const bool state)"
.PP
Sets the desired state of the device. \fBParameters:\fP
.RS 4
\fIport\fP port number as defined in \fBunderwater.h\fP 
.br
\fIstate\fP true = on, false = off. 
.RE
.PP

.SS "int GlobalCommand::SetForwardPower (const double power)"
.PP
Sets the desired forward thruster power. \fBParameters:\fP
.RS 4
\fIpower\fP desired power from -100 to 100. 
.RE
.PP

.SS "int GlobalCommand::SetTurnPower (const double power)"
.PP
Sets the desired turn thruster power. \fBParameters:\fP
.RS 4
\fIpower\fP desired power from -100 to 100. - is left, + is right 
.RE
.PP

.SS "int GlobalCommand::SetVerticalPower (const double power)"
.PP
Sets the desired vertical thruster power. \fBParameters:\fP
.RS 4
\fIpower\fP desired power from -100 to 100. - is down, + is up. 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for zebulon from the source code.
